<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path_Amazing = request.getContextPath();
    String basePath_Amazing = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path_Amazing + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>AmazingBook</title>
</head>
<body>
	<table width="800" align="center">
		<tr>
			<td>
                <br><%@include file="/top.jsp"%>
            </td>

		</tr>

		<tr>
			<td>
                <table width="800" align="center">
                    <tbody>
                    <tr>
                        <td colspan="2">
                            <div align="left">
                                <img src="<%=path_Amazing%>/images/lanmu_r1.jpg" width="85"
                                     height="29">
                            </div>
                        </td>
                    </tr>

                    <s:iterator value="#session.amallbooks" var="book" status="sta">
                        <s:if test="#sta.Odd">
                            <tr>
                                <td width="50%">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0"
                                           class="td">
                                        <tbody>
                                        <tr>
                                            <td width="30%" rowspan="5"><a
                                                    href="<%=path_Amazing%>/books/Book_bookDetail.action?bookid=<s:property value="#book.bookid"/>">
                                                <img
                                                        src="<%=path_Amazing%>/images/<s:property value="#book.picture"/>"
                                                        width="65" height="90" border="0">
                                            </a></td>
                                            <td width="25%">
                                                <div align="left">书名</div>
                                            </td>
                                            <td><s:property value="#book.bookname"/></td>
                                        </tr>
                                        <tr>
                                            <td width="25%">
                                                <div align="left">作者</div>
                                            </td>
                                            <td><s:property value="#book.author"/><br></td>
                                        </tr>
                                        <tr>
                                            <td width="25%">
                                                <div align="left">出版社</div>
                                            </td>
                                            <td><s:property value="#book.publisherid"/><br></td>
                                        </tr>
                                        <tr>
                                            <td width="25%">
                                                <div align="left">出版日期</div>
                                            </td>
                                            <td><s:property value="#book.pubdate"/><br></td>
                                        </tr>
                                        <tr>
                                            <td width="25%">
                                                <div align="left">定价</div>
                                            </td>
                                            <td>￥<s:property value="#book.price"/><br></td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <div align="left">
                                                    <a
                                                            href="<%=path_Amazing%>/order/Order_addBook2Cart.action?bookid=<s:property value="#book.bookid"/>"
                                                            <s:if test="#session.loginState != 1">
                                                                onclick="javascript: if(confirm('请登录购书系统！')) return false;
                                                                else return false;"
                                                            </s:if>
                                                            >放入购书车</a>&nbsp;&nbsp;
                                                    <a
                                                            href="<%=path_Amazing%>/books/Book_bookDetail.action?bookid=<s:property value="#book.bookid"/>">查看详情</a>
                                                </div>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </td>
                                <s:if test="!#sta.Last">
                                    <s:iterator value="#session.amallbooks" var="nextbook" begin="#sta.index+1" end="#sta.index+1">
                                        <td width="50%">
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0"
                                                   class="td">
                                                <tbody>
                                                <tr>
                                                    <td width="30%" rowspan="5"><a
                                                            href="<%=path_Amazing%>/books/Book_bookDetail.action?bookid=<s:property value="#nextbook.bookid"/>">
                                                        <img
                                                                src="<%=path_Amazing%>/images/<s:property value="#nextbook.picture"/>"
                                                                width="65" height="90" border="0">
                                                    </a></td>
                                                    <td width="25%">
                                                        <div align="left">书名</div>
                                                    </td>
                                                    <td><s:property value="#nextbook.bookname"/></td>
                                                </tr>
                                                <tr>
                                                    <td width="25%">
                                                        <div align="left">作者</div>
                                                    </td>
                                                    <td><s:property value="#nextbook.author"/><br></td>
                                                </tr>
                                                <tr>
                                                    <td width="25%">
                                                        <div align="left">出版社</div>
                                                    </td>
                                                    <td><s:property value="#nextbook.publisherid"/><br></td>
                                                </tr>
                                                <tr>
                                                    <td width="25%">
                                                        <div align="left">出版日期</div>
                                                    </td>
                                                    <td><s:property value="#nextbook.pubdate"/><br></td>
                                                </tr>
                                                <tr>
                                                    <td width="25%">
                                                        <div align="left">定价</div>
                                                    </td>
                                                    <td>￥<s:property value="#nextbook.price"/><br></td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <div align="left">
                                                            <a
                                                                    href="<%=path_Amazing%>/order/Order_addBook2Cart.action?bookid=<s:property value="#nextbook.bookid"/>"
                                                                    <s:if test="#session.loginState != 1">
                                                                        onclick="javascript: if(confirm('请登录购书系统！')) return false;
                                                                        else return false;"
                                                                    </s:if>
                                                                    >放入购书车</a>&nbsp;&nbsp;
                                                            <a
                                                                    href="<%=path_Amazing%>/books/Book_bookDetail.action?bookid=<s:property value="#nextbook.bookid"/>">查看详情</a>
                                                        </div>
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </s:iterator>
                                </s:if>
                            </tr>
                        </s:if>
                    </s:iterator>
                    </tbody>
                </table>
			</td>
        </tr>

		<tr>
            <td>
                <br><%@include file="/bottom.jsp"%>
            </td>
		</tr>
	</table>
</body>
</html>
